package com.handsome.service;

import com.handsome.entity.HsDictionary;
import com.handsome.utils.Result;

import java.util.List;

public interface DictionaryService {

    /**
     * 查询所有字典项
     *
     * @return List<HsDictionary>
     */
    List<HsDictionary> getAllDictionary();

    /**
     * 根据字典项的id 获取下级的的字典项
     *
     * @param id id
     * @return List<HsDictionary>
     */
    List<HsDictionary> getDictionaryById(Integer id);


    /**
     * 获取所有字典项 排除当前id的字典项
     *
     * @param id id
     * @return List<HsDictionary>
     */
    List<HsDictionary> getAllDictionaryExcludeCurrentId(Integer id);


    /**
     * 添加字典项
     *
     * @param dictionary dictionary
     * @return Result
     */
    Result addDictionaryItem(HsDictionary dictionary);


    /**
     * 删除字典项
     *
     * @param id id
     * @return Result
     */
    Result delDictionaryItem(Integer id);

}
